package cn.sytton.taffecloud.gateway.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.HashSet;
import java.util.Set;

/**
 * yml配置类：auth.api
 *
 * @author skyrock
 */
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "security.api")
@EnableConfigurationProperties(ApiProperties.class)
public class ApiProperties {
    /**
     * 允许匿名请求的api
     */
    private Set<String> anonymous = new HashSet<>();

    public Set<String> getAnonymous() {
        return anonymous;
    }

    public void setAnonymous(Set<String> anonymous) {
        this.anonymous = anonymous;
    }
}
